<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>推送详情</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui2/aui.css" />
    <style>
    	body{
    		
    	}
    	.hidden{
    	   display:none;
    	}
    </style>
</head>
<body>
	<header class="aui-bar aui-bar-nav">
        <div class="aui-pull-left aui-btn" id="btn_return" onclick="closeWin();">
            <span class="aui-iconfont aui-icon-left"></span>返回
        </div>
        <div class="aui-title">推送</div>
        <div id="illustration" tapmode class="aui-pull-right aui-btn aui-btn-outlined" onclick="illustrate();">
                        说明
        </div>
    </header>
</body>
<script data-main="../../script/main" src="../../script/require.js"></script>
<script type="text/javascript">
    var flag = false;
	apiready = function(){
		require(["zepto","api","common"],function(){
			var header = $api.dom('header');
			$api.fixStatusBar(header);
			headerPos = $api.offset(header);
			api.addEventListener({
	            name:'keyback'
            },function(ret,err){
                closeWin();
            });
			api.openFrame({
	            name: 'push_courses_frm',
                url: './push_courses_frm.html',
                rect: {
                    x:0,
                    y:0,
                    w:headerPos.w,
                    h:'auto',
                    marginTop:headerPos.h
                },
                pageParam:api.pageParam
            });
		})
	};
	
	function illustrate(){
        flag = true;
        $("#illustration").addClass('hidden');
        $(".aui-title").html("推送说明");
        api.openFrame({
            name: 'push_courses_illustration',
            url: './push_courses_illustration.html',
            rect: {
                x:0,
                y:0,
                w:headerPos.w,
                h:'auto',
                marginTop:headerPos.h
            },
            pageParam:api.pageParam
        });
	}
	function closeWin(){
        if(flag){
            api.closeFrame({
                name:'push_courses_illustration'
            });
            $("#illustration").removeClass('hidden');
            $(".aui-title").html("推送");
            flag = false;
        }else{
            api.closeWin();
        }
	}
</script>
</html>